package customize

import (
	v1 "gitcode.com/G-YT/baoyou/server/api/v1"
	"gitcode.com/G-YT/baoyou/server/middleware"
	"github.com/gin-gonic/gin"
)

type SolarTermsRouter struct{}

func (s *SolarTermsRouter) InitSolarTermsRouter(Router *gin.RouterGroup) {
	solarTermsRouter := Router.Group("solarTerms").Use(middleware.OperationRecord())
	solarTermsRouterWithoutRecord := Router.Group("solarTerms")
	solarTermsApi := v1.ApiGroupApp.CustomizeApiGroup.SolarTermsApi
	{
		solarTermsRouter.POST("createSolarTerms", solarTermsApi.CreateSolarTerms)             // 新建节气
		solarTermsRouter.DELETE("deleteSolarTerms", solarTermsApi.DeleteSolarTerms)           // 删除节气
		solarTermsRouter.DELETE("deleteSolarTermsByIds", solarTermsApi.DeleteSolarTermsByIds) // 批量删除节气
		solarTermsRouter.PUT("updateSolarTerms", solarTermsApi.UpdateSolarTerms)              // 更新节气
		solarTermsRouter.POST("setSolarTermsArticle", solarTermsApi.SetSolarTermsArticle)     // 设置节气文章关系
		solarTermsRouter.GET("getSolarTermsArticle", solarTermsApi.GetSolarTermsArticle)      // 获取节气文章关系
	}
	{
		solarTermsRouterWithoutRecord.GET("findSolarTerms", solarTermsApi.FindSolarTerms)       // 根据ID获取节气
		solarTermsRouterWithoutRecord.GET("getSolarTermsList", solarTermsApi.GetSolarTermsList) // 获取节气列表
	}
}
